﻿using AnesSystem.Models;
using AnesSystem.Services;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels.Configuration.DataGrid
{
    class ConfigRoomDataGridViewModel : BaseViewModel<ConfigRoomDataGridViewModel>
    {
        #region Variables

        private ObservableCollection<ConfigOperationRoomModel> _configOperationRoomModel = new ObservableCollection<ConfigOperationRoomModel>();

#endregion

        #region Constructor

        public ConfigRoomDataGridViewModel()
        {
            initConfigOperationRoomModel();
        }

        #endregion

        #region Properties

        public ObservableCollection<ConfigOperationRoomModel> ConfigOperationRoomModel
        {
            get
            {
                return _configOperationRoomModel;
            }

            set
            {
                _configOperationRoomModel = value;
                RaisePropertyChanged("ConfigOperationRoomModel");
            }
        }

        #endregion

        #region Event

        #endregion

        #region Private Methods
        private void initConfigOperationRoomModel()
        {
            IEnumerable<ConfigOperationRoomModel> list = ConfigOperationRoomModelService.Instance.FindAll();
            foreach (var item in list)
            {
                if (item.Deleted)
                {
                    continue;
                }
                _configOperationRoomModel.Add(item);
              
            }
        }

       
        #endregion

        #region Public/Protected Methods


        #endregion

        #region EventHandlers

        #endregion

        #region Command

        #region ChangeDoctorCommand

        #endregion

        #region OpenPopupCommand

        #endregion
        #endregion

    }
}
